package com.denlaku.longan.service.impl;

import com.denlaku.longan.repository.TenantMemDataPermRepository;
import com.denlaku.longan.service.TenantMemDataPermService;
import com.denlaku.longan.vo.TenantMemDataPerm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tianx
 */
@Service
public class TenantMemDataPermServiceImpl implements TenantMemDataPermService {
    @Autowired
    private TenantMemDataPermRepository tenantMemDataPermRepository;

    @Override
    public void batchAdd(List<TenantMemDataPerm> list) {
        tenantMemDataPermRepository.batchAdd(list);
    }

    @Override
    public List<TenantMemDataPerm> list(Long tenantId, Long userId) {
        return tenantMemDataPermRepository.list(tenantId, userId);
    }

    @Override
    public void batchDelete(Long tenantId, Long userId) {
        tenantMemDataPermRepository.batchDelete(tenantId, userId);
    }

    @Override
    public void delete(Long tenantId, Long id) {
        tenantMemDataPermRepository.delete(tenantId, id);
    }
}
